﻿using System;
using System.ServiceModel.DomainServices.Client;

namespace Warehouse.Silverlight.Core.Infrastructure.Events
{
    public class InvokeOperationEventArgs : ResultsArgs
    {
        private readonly InvokeOperation _invokeOperation;

        public InvokeOperationEventArgs(Exception exception)
            : base(exception)
        {
            _invokeOperation = null;
        }

        public InvokeOperationEventArgs(InvokeOperation invokeOperation)
            : base(null)
        {
            _invokeOperation = invokeOperation;
        }

        public InvokeOperationEventArgs(InvokeOperation invokeOperation, Exception exception)
            : base(exception)
        {
            _invokeOperation = invokeOperation;
        }

        public InvokeOperation InvokeOperation
        {
            get { return _invokeOperation; }
        }
    }
}
